package com.fuang.stream;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by Fuang on 2017-6-29.
 */
public class Test<T, R> {

    static {
        System.out.println("load outer class...");
    }

    //静态内部类
    static class StaticInner {
        static {
            System.out.println("load static inner class...");
        }

        static void staticInnerMethod() {
            System.out.println("static inner method...");
        }

        private static final Test INSTANCE = new Test();
    }

    public static void main(String[] args) {
        String str = "test";
        System.out.println(str.hashCode());
        Test outer = new Test();      //此刻其内部类是否也会被加载？
        System.out.println("===========分割线===========");
        Test.StaticInner.staticInnerMethod();      //调用内部类的静态方法
    }
}
